package http

import (
	"gitee.com/aviptle/goclean/ddd1125/blog"
	"github.com/gin-gonic/gin"
)

func NewHandler(svc blog.Service) *Handler {
	return &Handler{
		Service: svc,
	}
}

type Handler struct {
	Service blog.Service
}

func (h *Handler) Registry(r gin.IRouter) {
	r.POST("/vblog/api/v1/blogs", h.CreateBlog)
}

func (h *Handler) CreateBlog(ctx *gin.Context) {
	h.Service.CreateBlog(nil, nil)
}
